package com.security.test;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

import com.security.util.SecurityUtil;

public class CreateHash {

	public static void main(String[] args) throws NoSuchAlgorithmException, UnsupportedEncodingException {
		String password="master2014";
		byte[] bSalt=SecurityUtil.createSalt();
		
		
		String salt=SecurityUtil.encodeBase64(bSalt);
		
		
		byte[] bHash=SecurityUtil.getHash(password, bSalt);
		
		String hash=SecurityUtil.encodeBase64(bHash);
		
		System.out.println("Salt: "+salt);
		System.out.println("Hash: "+hash);
	}

}
